<%@ page import="Model.SportBean" %>
<%@ page import="Model.Sport" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="Model.ResultBean" %>
<%@ page import="Model.Result" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% application.setAttribute("path",request.getContextPath());%>

<jsp:useBean id="resultBean" class="Model.ResultBean" scope="session"/>
<html>
<%
    String name = (String) session.getAttribute("name");
%>
<head>
    <title>发布成绩2</title>
    <%--<link type="text/css" rel="stylesheet" href="../bootstrap/bootstrap.min.css">--%>
    <script type="text/javascript" src="../bootstrap/bootstrap.min.js"></script>
    <link rel="stylesheet" href="../css/index.css" type="text/css">
    <style>
        #page_nav{
            position: absolute;
            left: 480px;
            top: 570px;
            font-size: 20px;
        }
        .input{
            position: absolute;
            left: 1330px;
            top: 560px;
        }
        #page_nav a{
            color: blue;
        }
        #page_nav a:hover{
            color: red;
        }
        #page_nav{
            margin-left: 160px;
            margin-top: 25px;
        }
        .tail{
            position: absolute;
            font-size: 18px;
            left: 410px;
            top: 670px;
        }
        .button{
            border-radius: 10px;
            margin:0;
            border:none;
            width:100px;
            background-repeat:no-repeat;
            background-color: #19aa8d;
            height:30px;
            padding-top:0;
        }
    </style>
</head>
<body>
<div>

    <div class="head">
        <div class="headOne">
            <p id="system">运动会管理系统</p>
        </div>

        <div class="headThree">
            <div class="info" style="margin-top: 10px">
                <%--                <img src="../image/样式.png" alt="图片加载失败！">--%>
            </div>

            <div class="manager">
                <div id="manager_one">
                    <img src="../image2/管理员.png" alt="图片加载失败" width="30px">
                </div>
                <div id="manager_two">
                    <div style="font-size: 20px;color:white;"><%=name%></div>
                </div>
            </div>

            <div class="quit">
                <a class="quit" href="../jsp/login.jsp">☛退 出 登 录</a>
            </div>
        </div>
    </div>
    <div class="body_one">
        <div class="function1">
            🚀功能菜单
        </div>
        <div class="operating">
            <img src="../image/搜索.png" alt="加载失败" width="25px">&nbsp;&nbsp;<span><a href="../LookSportServlet">查询运动项目</a></span><br><br>
            <img src="../image/替换.png" alt="加载失败">&nbsp;&nbsp;&nbsp;<span><a href="add_sport.jsp">添加运动项目</a></span><br><br>
            <img src="../image/搜索.png" alt="加载失败">&nbsp;<span><a href="update_sport1.jsp">修改运动项目</a></span><br><br>
            <br>
            <br>
            <img src="../image/搜索.png" alt="加载失败" width="25px">&nbsp;&nbsp;<span><a href="release_score1.jsp">公布成绩</a></span><br><br>
            <img src="../image2/比例.png" alt="加载失败">&nbsp;<span><a href="banjiang.jsp">奖项颁布</a></span><br><br>
        </div>
    </div>
    <div class="body_two">
        <div class="body_head">
            <div class="home">
                <a href="admin_index.jsp"><img src="../image/主页.png" alt="图片加载失败！"></a>
            </div>
            <div class="drop">
                <img src="../image2/下拉条.png" alt="图片加载失败！">
            </div>
        </div>

        <div class="body_tail">
            <div align="center" style="color: dodgerblue;font-size: 40px;margin-top: 10px">
                公布成绩
            </div>


            <div>
                <form action="../ReleaseScore2" method="get">
                    <table class="table table-hover" style="width: 1100px;margin-top: 30px;font-size: 20px" align="center">
                        <thead>
                        <tr>
                            <th>学号</th>
                            <th>姓名</th>
                            <th>学院</th>
                            <th>班级</th>
                            <th>分数</th>
                            <th>排名</th>
                        </tr>
                        </thead>
                        <tbody align="center">
                        <%
                            ResultBean db=(ResultBean) session.getAttribute("resultBean");
                            ArrayList<Result> d;
                            d = db.getResults();

                            for(int i=0;i<d.size();i++){
                                out.print("<tr>");
                                out.print("<td>"+d.get(i).getId()+"</td>");
                                out.print("<td>"+d.get(i).getName()+"</td>");
                                out.print("<td>"+d.get(i).getDept()+"</td>");
                                out.print("<td>"+d.get(i).getSporter_class()+"</td>");
                                out.print("<td>"+d.get(i).getGrade()+"</td>");
//                                out.print("<input type="+"hidden name="+"num value="+i+">");
//                                out.print("<td><input type="+"radio name="+"rank value="+"1"+">"+"金牌"+"</td>");
                                out.print("<td><select name="+"rank"+i+
                                        "<option>---请选择---</option>" +
                                        "<option>0</option>" +
                                        "<option>1</option>" +
                                        "<option>2</option>" +
                                        "<option>3</option>" +
                                        "<option>4</option>" +
                                        "<option>5</option>" +
                                        "<option>6</option>" +
                                        "<option>7</option>" +
                                        "<option>8</option>" +
                                        "<option>9</option>" +
                                        "<option>10</option>"+
                                        "</td>");
                                out.print("</tr>");
                            }
                        %>
                        </tbody>
                        <input style="margin-left: 55px;margin-top: 15px" type="submit" name="ok" value="提交" class="button">
                    </table>

                </form>
            </div>

            <div class="tail">
                河南工业大学
            </div>
        </div>
    </div>
</div>

</body>
</html>
